package com.smart.order.exception;

import com.smart.order.vo.ResponseCode;
import lombok.Getter;

@Getter
public class ServiceException extends RuntimeException {
    private Integer status;
    private String msg;
    private ResponseCode responseCode;

    public ServiceException(Integer status, String message) {
        super(message);
        this.status = status;
    }

    public ServiceException(ResponseCode responseCode) {
        this.responseCode = responseCode;
        this.msg = responseCode.getMsg();
        this.status = responseCode.getStatus();
    }

}
